<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        {% block title %}
        <title>parent</title>
        {% endblock %}
    </head>
    <body>

        {# 定义块 #}
        {% block header %}
        <h1>parent</h1>
        {% endblock %}

        {% block main %}
        <div>main</div>
        {% endblock %}

         {% block footer %}
        <div>footer</div>
        {% endblock %}
        
    </body>
</html>